/*****************************************************************************************
This file is a part of Arise library.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

Arise Engine		TexturePool.h

					E-mail:	arise_engine@mail.ru

created:			11.03.2007
last changes:		02.05.2008
*****************************************************************************************/
#pragma once

#include "RendererD3D9.h" 
#include <map>


class TexturePool
{
private:

	void*				m_render_device;
	LPDIRECT3DDEVICE9	m_d3d_device;
	std::string			m_path;
	
	std::map<std::string, LPDIRECT3DTEXTURE9>	m_items;

public:
	TexturePool();
	TexturePool(LPDIRECT3DDEVICE9 d3d_device);
	virtual ~TexturePool();

	LPDIRECT3DTEXTURE9* add(const std::string &name);
	LPDIRECT3DTEXTURE9* add(const std::string &name, const std::string &path);
	void release();

	void SetPath(const std::string& path) {m_path = path;}
	void SetDevice(void* render_device){m_render_device = render_device;}
};

